import request from "../request.js"

let header = {
	"content-type": "application/json"
}

/**
 * 获取配置
 */
export const peizhi = async () => {
	let {
		data
	} = await request({
		url: `https://lsol-house-upload.oss-cn-hangzhou.aliyuncs.com/2020-09-29wxls/other/skisVoteApp20240115/pz.json?time=${new Date().getTime()}`,
		header,
		method: 'GET'
	});
	if (!data.success) {
		uni.showToast({
			title: data.message || '获取配置信息失败',
			duration: 2000,
			icon: 'none'
		});
		return Promise.reject(new Error(data.message || '获取配置信息失败'))
	}
	return data.data
}